how to apply the dot product of two vectors